<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset={WIKI_CHARSET}">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>hdwiki 后台管理中心</title>
<link href="style/default/admin/admin.css" rel="stylesheet" type="text/css" />
<link href="{WIKI_URL}/js/hdeditor/skins/editor.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="js/jquery.js"></script>
<style type="text/css">
#calendar { border: 1px solid #C1C1C1; background: #FFF; margin-bottom: 0.8em;}
#calendar td { padding: 2px; font-weight: bold;}
#calendar_week td { height: 2em; line-height: 2em; border-bottom: 1px solid #E2E2E2;}
#hourminute td {padding: 4px 2px; border-top: 1px solid #E2E2E2;}
	.calendar_expire, .calendar_expire a:link, .calendar_expire a:visited {	color: #535353; font-weight: normal; }
	.calendar_default, .calendar_default a:link, .calendar_default a:visited { color: #535353;}
	.calendar_checked, .calendar_checked a:link, .calendar_checked a:visited { color: #DD0000; font-weight: bold;}
	td.calendar_checked, span.calendar_checked{ background: #E2E2E2;}
	.calendar_today, .calendar_today a:link, .calendar_today a:visited { color: #535353; font-weight: bold; }
#calendar_header td{ width: 30px; height: 20px; border-bottom: 1px solid #E2E2E2; font-weight: normal; }
#calendar_year { display: none;	line-height: 130%; background: #FFF; position: absolute; z-index: 10; }
	#calendar_year .col { float: left; background: #FFF; margin-left: 1px; border: 1px solid #E2E2E2; padding: 4px; }
#calendar_month { display: none; background: #FFF; line-height: 130%; border: 1px solid #DDD; padding: 4px; position: absolute; z-index: 11; }


.bord textarea {border:0px; width:690px;overflow:hidden; }
#hd_container { width: 686px; }
/* 需修改的 */
.htmltext { height: auto; }
.ts {color:red;}
html{background:#F8F8F9;}
body{max-width:none !important;min-width:auto;margin:0;font:12px/1.2 verdana,SimSun,Arial,Helvetica,'sans-serif'}
#hd_container,.editor_left{width:95% !important;padding:0 10px;}
#hd_container{left:25px !important;right:5% !important;width:95% !important;}
.table{margin:10px;}
</style>
</head>
<body>
<div id="append_parent"></div>
<script type="text/javascript" src="js/calendar.js"></script>
<script type="text/javascript" src="js/jquery.dialog-0.8.min.js"></script>
<script type="text/javascript">
	$.dialog.setConfig('base', './style/default');
</script>
<div class="right">
<p class="map">内容管理：词条管理</p>
<p class="sec_nav">词条管理： <a href="index.php?admin_doc"> <span>管理词条</span></a> <a href="index.php?admin_focus-focuslist"  ><span>推荐词条</span></a> <a href="index.php?admin_synonym" ><span>管理同义词</span></a> <a href="index.php?admin_relation" ><span>相关词条</span></a> <a href="index.php?admin_edition"  ><span>版本评审</span></a> <a href="index.php?admin_cooperate" ><span>待完善词条</span></a> <a href="index.php?admin_nav" class="new"><span>导航模块<label class="red">new</label></span></a></p>
<h3 class="col-t"><span><a href="index.php?admin_nav">导航模块</a></span><span class="on"><a href="index.php?admin_navmodel">导航模块模型</a></span></h3>

<h3 class="col-h4 m-t10">添加导航模块模型</h3>
<div class="synonym">
	<form method="POST" name="formdoclist" id="formdoclist" action="index.php?admin_navmodel-add">
		<table class="table">
			<tr>
				<td style="width:120px;">选择导航模块模型</td>
				<td>
				<select name="navmodelid" onchange="getcode(this.value)">
					<option value=0>自定义</option>
					<!--{loop $navmodellist $navmodel}-->
						<option value="{$navmodel['id']}"><!--{eval echo htmlspecialchars($navmodel['name']);}--></option>
					<!--{/loop}-->
				</select>
				</td>
			</tr>
			<tr>
				<td>新导航模块模型名称</td>
				<td><input id="name" name="name" type="text" class="inp_txt" size="30"/><label id="v_name" class="ts"></label></td>
			</tr>
		</table>

					<div id="hd_container">
						<div id="position_toolbar"></div>
					</div>
					<div id="text" class="hd-box editor_left">
						<textarea id="content" name="content" style="width:98%;height:400px;visibility:hidden;display:none;">
						
						</textarea>
						<div id="hd_content"></div>
					</div>				
		
		
	
			<input name="submit" type="submit" value="保存" class="inp_btn m-t10" onclick="UnloadConfirm.clear()"/>

	</form>
<script type="text/javascript" src="./js/hdeditor/hdeditor.min.js"></script>
<script type="text/javascript">
var g_content_id="content";
if (typeof g_filterExternal == 'undefined') var g_filterExternal = 0;
HD.show({
	id : g_content_id,
	minHeight:400,
	skinType : 'editor',
	cssPath : 'js/hdeditor/skins/content.css',
	id_container:'hd_container',
	id_toolbar:'hd_container',
	position_toolbar:'position_toolbar',
	position_content:'hd_content',
	filterExternal:g_filterExternal,
	items : ['undo','redo','cut','copy','paste','bold','fontstyle','justifyleft','justifymore', 'title1', 'title2', 'innerlink', 'image', 'media','table','specialchar','clean','source']
});
//setTimeout('UnloadConfirm.clear()', 5000);
	function getcode(id){
		if(id == 0){
			Pushedit('');
			return;
		}
		$.ajax({
			url:'index.php?admin_navmodel-getmodel',
			type:'POST',
			data:{ id: id },
			timeout:22000,
			dataType:'xml',
			beforeSend:function(){
				$('#content').html('正在请求中...请稍候!');
			},
			success :function(data, state){
				Pushedit(data.lastChild.firstChild.nodeValue);
			},
			complete :function(response, state){
				if (state != 'success'){
					$('#content').html('网络连接失败，请稍候再试!');
				}
			}
		});
	}
	
	function Pushedit(content){
		HD.g[g_content_id].idocument.body.innerHTML = content;
	}
</script>
</div>
<script type="text/javascript" src="./js/validator.js"></script>
<script type="text/javascript">
Validator=new Validator("formdoclist",false,null);
Validator.bind("name",[["empty","导航模块模型名称不能为空!"]]);
</script>
{template admin_footer} 